# Contributor: Nathan Caldwell <saintdev@gmail.com>
# Maintainer: Nathan Caldwell <saintdev@gmail.com>
# NOTE: For now we must use vendored libfuse, see the URL below for details.
#       https://github.com/trapexit/mergerfs/blob/2.27.0/README.md#why-was-libfuse-embedded-into-mergerfs
pkgname=mergerfs
pkgver=2.37.1
pkgrel=0
pkgdesc="A FUSE based union filesystem"
url="https://github.com/trapexit/mergerfs"
arch="all"
license="ISC"
depends="libattr"
makedepends="autoconf automake libtool gettext-dev attr-dev linux-headers"
options="suid !check" # No test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/trapexit/mergerfs/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	echo "$pkgver" > "$builddir"/VERSION
}

build() {
	export GIT_CEILING_DIRECTORIES="$srcdir"
	make OPTS="$CXXFLAGS"
}

package() {
	make PREFIX="/usr" DESTDIR="$pkgdir" install
}

sha512sums="
d48a0627be89fa2f587f874242af00f156e74e9e60a0bcc5dc6cf28683633e886ad47e0f8315c9c54dc3fb61dc37b45aa9d70b2343257ff6cf39beec1ba0be9d  mergerfs-2.37.1.tar.gz
"
